package com.zjp.service.impl;

import com.zjp.mapper.HealthreportMapper;
import com.zjp.pojo.Healthreport;
import com.zjp.service.HealthreportService;
import com.zjp.vo.HealthDeclarationRecordVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HealthreportServiceImpl implements HealthreportService {

    @Autowired
    private HealthreportMapper healthreportMapper;
    /**
     * 健康上报
     * @param healthreport
     * @return
     */
    public int addHealthreport(Healthreport healthreport) {
        return healthreportMapper.insert(healthreport);
    }

    /**
     * 健康上报查询
     *
     * @param
     * @param id
     * @return
     */
    public List<Healthreport> findReportProvince(long id) {
        return (List<Healthreport>) healthreportMapper.selectByPrimaryKey(id);
    }

    /**
     * 健康上报记录
     *
     * @param id
     * @param healthDeclarationRecordVo
     * @return
     */
    public List<HealthDeclarationRecordVo> HealthDeclarationRecord(long id, HealthDeclarationRecordVo healthDeclarationRecordVo) {
        List<HealthDeclarationRecordVo> all = healthreportMapper.findAll(id, healthDeclarationRecordVo);
        return all;
    }
}
